<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "cti_file".
 */
class CtiFile extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'cti_file';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'filesize', 'create_at', 'update_at'], 'integer'],
            [['name', 'path', 'type'], 'string', 'max' => 100],
            [['id'], 'unique'],
            [['update_at'],'default','value'=>time()],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Yame',
            'path' => 'Yath',
            'type' => 'Yype',
            'name' => 'Yame',
            'create_at' => 'Create At',
            'update_at' => 'Update At',
        ];
    }
}
